/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import React from "react";
import classNames from "classnames";
import styles from "./index.less";

const GlobalFooter = ({ className, links, copyright, recordNo }) => {
  const clsString = classNames(styles.globalFooter, className);
  return (
    <div className={clsString}>
      {links && (
        <div className={styles.links}>
          {links.map(link => (
            <a key={link.key} target={link.blankTarget ? "_blank" : "_self"} href={link.href}>
              {link.title}
            </a>
          ))}
        </div>
      )}
      {copyright && <div className={styles.copyright}>{copyright}</div>}
      {recordNo && (
        <div>
          <a
            className={styles.copyright}
            target="_blank"
            href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=31010502000130"
          >
            <img src="//img.kuaidihelp.com/www/ghs.png" />
            <span>{recordNo}</span>
          </a>
        </div>
      )}
    </div>
  );
};

export default GlobalFooter;
